package vip.xiaonuo.device.modular.service.impl;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import vip.xiaonuo.device.modular.mapper.CabinetInfoMapper;
import vip.xiaonuo.device.vo.Result;

import javax.annotation.Resource;

/**
 * @author 墨塵
 * @since 2023/2/27d
 */
@Service("deviceCabinetContactService")
public class DeviceCabinetContactService extends DeviceBaseService {

    @Resource
    private CabinetInfoMapper cabinetInfoMapper;

    @Override
    protected Integer getReqType() {
        return null;
    }

    @Override
    protected Boolean getLogFlag() {
        return false;
    }

    @Override
    protected Result handle(JSONObject param) {
        String cabinetId = param.getString("cabinetId");
        return Result.ok(cabinetInfoMapper.getContactList(cabinetId));
    }
}
